package com.neusoft.service.impl;

import com.neusoft.domain.User;
import com.neusoft.mapper.UserDao;
import com.neusoft.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    // 创建UserDao对象
    @Autowired
    UserDao userDao ;

    @Override
    public User getUserById(String userId)  {
        User user = userDao.getUserById(userId);
        return user;
    }

    @Override
    public int saveUser(User user) {
        int row = userDao.saveUser(user);
        return row;
    }

    @Override
    public User getUserByIdByPass(String userId, String password) {
        User user = userDao.getUserByIdByPass(userId, password);
        return user;
    }
}
